/* =========================================================
   MODERN PORTFOLIO ENHANCEMENT
   ========================================================= */

/* ---------- BASE ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(99, 102, 241, 0.08),
      transparent 30%
    ),
    #f8fafc;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

.dark body {
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(99, 102, 241, 0.12),
      transparent 30%
    ),
    #020617;
}


/* ---------- SELECTION ---------- */

::selection {
  background: #6366f1;
  color: white;
}


/* ---------- CUSTOM SCROLLBAR ---------- */

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    #6366f1,
    #8b5cf6
  );
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    #4f46e5,
    #7c3aed
  );
}

.dark ::-webkit-scrollbar-track {
  background: #020617;
}


/* =========================================================
   NAVBAR
   ========================================================= */

header {
  transition: all 0.3s ease;
}

header nav > div {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

header nav > div:hover {
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.12);
}


/* navbar links */

header nav a {
  position: relative;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    #6366f1,
    #ec4899
  );
  border-radius: 10px;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

header nav a:hover::after {
  width: 70%;
}


/* Theme button */

#themeButton {
  position: relative;
  overflow: hidden;
}

#themeButton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(236, 72, 153, 0.15)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

#themeButton:hover::before {
  opacity: 1;
}


/* =========================================================
   HERO
   ========================================================= */

#home {
  position: relative;
  overflow: hidden;
}


/* Decorative circles */

#home::before {
  content: "";
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  filter: blur(10px);
  top: -150px;
  left: -150px;
  pointer-events: none;
}

#home::after {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.07);
  filter: blur(10px);
  right: -120px;
  bottom: -100px;
  pointer-events: none;
}


/* Hero heading */

#home h1 {
  letter-spacing: -0.055em;
}

#home h1 span {
  display: inline-block;
  animation: gradientMove 5s ease infinite;
  background-size: 200% auto;
}

@keyframes gradientMove {

  0% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }

  100% {
    background-position: 0% center;
  }

}


/* Hero paragraph */

#home p {
  font-size: 1.05rem;
}


/* Hero buttons */

#home a[href="#projects"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#home a[href="#projects"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.25),
    transparent
  );
  transition: left 0.6s ease;
  z-index: -1;
}

#home a[href="#projects"]:hover::before {
  left: 100%;
}


/* =========================================================
   PROFILE IMAGE
   ========================================================= */

#home .relative.w-64 {
  transition:
    transform 0.5s ease;
}

#home .relative.w-64:hover {
  transform:
    translateY(-10px)
    scale(1.03);
}

#home .relative.w-64::before {
  content: "";
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.25);
  animation: rotateRing 12s linear infinite;
}

@keyframes rotateRing {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }

}


/* profile image */

#home .relative.w-64 img {
  transition:
    transform 0.6s ease,
    filter 0.6s ease;
}

#home .relative.w-64:hover img {
  transform: scale(1.06);
  filter: saturate(1.15);
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

section h2 {
  letter-spacing: -0.04em;
}

section > div > div:first-child p {
  letter-spacing: 0.08em;
}


/* =========================================================
   ABOUT CARDS
   ========================================================= */

#about .grid.grid-cols-2 > div {
  position: relative;
  overflow: hidden;
  border:
    1px solid rgba(148, 163, 184, 0.12);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

#about .grid.grid-cols-2 > div::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  right: -40px;
  top: -40px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  transition: transform 0.4s ease;
}

#about .grid.grid-cols-2 > div:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.1);
}

#about .grid.grid-cols-2 > div:hover::before {
  transform: scale(2.2);
}


/* icons */

#about .grid.grid-cols-2 > div > div:first-child {
  transition:
    transform 0.3s ease;
}

#about .grid.grid-cols-2 > div:hover
> div:first-child {
  transform:
    scale(1.15)
    rotate(-5deg);
}


/* =========================================================
   SKILLS
   ========================================================= */

.skill-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;

  border:
    1px solid rgba(148, 163, 184, 0.12);

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.95),
      rgba(248,250,252,0.9)
    );

  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.05);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.dark .skill-card {
  background:
    linear-gradient(
      145deg,
      rgba(15,23,42,0.95),
      rgba(30,41,59,0.8)
    );
}

.skill-card::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -50px;
  bottom: -50px;
  border-radius: 50%;
  background:
    linear-gradient(
      135deg,
      rgba(99,102,241,.2),
      rgba(139,92,246,.1)
    );
  transition: transform 0.4s ease;
}

.skill-card:hover {
  transform:
    translateY(-8px)
    scale(1.02);

  border-color:
    rgba(99,102,241,.4);

  box-shadow:
    0 20px 45px rgba(99,102,241,.15);
}

.skill-card:hover::before {
  transform: scale(2);
}


/* =========================================================
   PROJECT CARDS
   ========================================================= */

#projects article {
  position: relative;
  border:
    1px solid rgba(148, 163, 184, 0.1);

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

#projects article:hover {
  transform: translateY(-12px);

  border-color:
    rgba(99,102,241,.25);

  box-shadow:
    0 25px 60px rgba(15,23,42,.12);
}


/* project image */

#projects article img {
  transition:
    transform 0.7s cubic-bezier(.2,.8,.2,1),
    filter 0.5s ease;
}

#projects article:hover img {
  transform: scale(1.1);
  filter: saturate(1.2);
}


/* project image overlay */

#projects article .h-48 {
  position: relative;
}

#projects article .h-48::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to top,
      rgba(15,23,42,.25),
      transparent
    );

  pointer-events: none;
}


/* project tags */

#projects article span {
  transition:
    transform 0.25s ease;
}

#projects article:hover span {
  transform: translateY(-2px);
}


/* project link */

#projects article a {
  position: relative;
}

#projects article a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: #6366f1;
  transition: width 0.3s ease;
}

#projects article a:hover::after {
  width: 100%;
}


/* =========================================================
   EXPERIENCE
   ========================================================= */

#experience .relative.pl-8 {
  padding: 30px 30px 30px 35px;

  border-left:
    2px solid rgba(99,102,241,.45);

  border-radius: 0 20px 20px 0;

  background:
    linear-gradient(
      90deg,
      rgba(99,102,241,.06),
      transparent
    );

  transition:
    transform 0.35s ease,
    background 0.35s ease;
}

#experience .relative.pl-8:hover {
  transform: translateX(8px);

  background:
    linear-gradient(
      90deg,
      rgba(99,102,241,.12),
      transparent
    );
}


/* timeline dot */

#experience .absolute {
  box-shadow:
    0 0 0 6px rgba(99,102,241,.12),
    0 0 20px rgba(99,102,241,.5);

  transition:
    transform 0.3s ease;
}

#experience .relative.pl-8:hover
.absolute {
  transform: scale(1.25);
}


/* =========================================================
   CONTACT
   ========================================================= */

#contact form {
  position: relative;
}

#contact input,
#contact textarea {
  border:
    1px solid rgba(148,163,184,.15);

  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

#contact input:hover,
#contact textarea:hover {
  border-color:
    rgba(99,102,241,.3);
}

#contact input:focus,
#contact textarea:focus {
  border-color:
    #6366f1;

  box-shadow:
    0 0 0 4px rgba(99,102,241,.1);

  transform: translateY(-2px);
}


/* contact button */

#contact button {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

#contact button:hover {
  transform: translateY(-3px);

  box-shadow:
    0 15px 30px rgba(99,102,241,.3);
}

#contact button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.25),
      transparent
    );

  transition:
    left 0.6s ease;
}

#contact button:hover::before {
  left: 100%;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 200px;
  height: 1px;

  transform: translateX(-50%);

  background:
    linear-gradient(
      90deg,
      transparent,
      #6366f1,
      #ec4899,
      transparent
    );
}


/* =========================================================
   FADE ANIMATIONS
   ========================================================= */

.animate-fade-up {
  animation:
    fadeUpEnhanced 0.8s
    cubic-bezier(.2,.8,.2,1)
    forwards;
}

@keyframes fadeUpEnhanced {

  from {
    opacity: 0;
    transform:
      translateY(35px);
  }

  to {
    opacity: 1;
    transform:
      translateY(0);
  }

}


/* =========================================================
   FLOATING ANIMATION
   ========================================================= */

.animate-float {
  animation:
    floatEnhanced 5s
    ease-in-out
    infinite;
}

@keyframes floatEnhanced {

  0%,
  100% {
    transform:
      translateY(0)
      rotate(0deg);
  }

  50% {
    transform:
      translateY(-12px)
      rotate(1deg);
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  #home {
    padding-top: 130px;
  }

  #home h1 {
    font-size: 3.5rem;
    line-height: 1;
  }

  #home h2 {
    font-size: 1.5rem;
  }

  #home p {
    font-size: 0.95rem;
  }

  #home::before {
    width: 250px;
    height: 250px;
  }

  #home::after {
    width: 220px;
    height: 220px;
  }

  #about .grid.grid-cols-2 {
    gap: 12px;
  }

  #about .grid.grid-cols-2 > div {
    padding: 1rem;
  }

  .skill-card {
    padding: 1.2rem;
  }

  #experience .relative.pl-8 {
    padding:
      25px
      20px
      25px
      30px;
  }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

  #home h1 {
    font-size: 2.8rem;
  }

  #home h2 {
    font-size: 1.3rem;
  }

  #home .flex.flex-wrap {
    flex-direction: column;
  }

  #home .flex.flex-wrap a {
    width: 100%;
    text-align: center;
  }

  #home .relative.w-64 {
    width: 220px;
    height: 220px;
  }

  section h2 {
    font-size: 2.2rem;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 15px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);

  color: #334155;
  font-size: 14px;
  font-weight: 600;

  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.dark .social-button {
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
}

.social-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.15);
}

.social-icon {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;

  color: white;
  font-size: 11px;
  font-weight: 800;

  background: #6366f1;
}

.github .social-icon {
  background: #111827;
}

.linkedin .social-icon {
  background: #0a66c2;
}

.instagram .social-icon {
  background: linear-gradient(
    135deg,
    #833ab4,
    #fd1d1d,
    #fcb045
  );
}

.tiktok .social-icon {
  background: #000;
}

.whatsapp .social-icon {
  background: #22c55e;
}

.github:hover {
  color: #111827;
}

.linkedin:hover {
  color: #0a66c2;
}

.instagram:hover {
  color: #e1306c;
}

.tiktok:hover {
  color: #000;
}

.whatsapp:hover {
  color: #16a34a;
}
